#pragma once

#include "builder.h"

class Director 
{
private:
  BuilderPtr builder_{};
public:
  Director() = default;
  ~Director() = default;
  void setBuilder(BuilderPtr builder);
  void construct();
};

using DirectorPtr = std::shared_ptr<Director>;

void Director::setBuilder(BuilderPtr builder) {
  builder_ = builder;
}

void Director::construct() {
  builder_->buildPartA();
  builder_->buildPartB();
}
